<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'product-channel-form',
	'enableAjaxValidation'=>false,
	// 'htmlOptions'=>array('enctype'=>'multipart/form-data'),
	'focus'=>Utils::AutoFocus($model, '')
)); ?>
	<?php echo CHtml::hiddenField('action','update'); ?>

	<?php echo $form->errorSummary($model); ?>
<table width="100%">
	<tr><td style="vertical-align:top">
		<table>

			<tr>
				<td class="col1"><?php echo $form->labelEx($model,'title'); ?></td>
				<td class="col2"><?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?></td>
			</tr>

			<tr>
				<td class="col1"><?php echo $form->labelEx($model,'sort'); ?></td>
				<td class="col2"><?php echo $form->textField($model,'sort',array('size'=>10,'maxlength'=>10)); ?></td>
			</tr>

			<tr>
				<td class="col1"><?php echo $form->labelEx($model,'visible'); ?></td>
				<td class="col2"><?php echo $form->checkBox($model,'visible'); ?></td>
			</tr>

		</table>
	</td>
	<td class="col2" width="35%">
		<fieldset>
			<legend><?php echo Yii::t('backend','Sản phẩm') ?></legend>
			<?php $this->widget('zii.widgets.CDetailView', array(
				'data'=>$model,
				'attributes'=>array(
					'id',
					'title',
					'sort',
					'visible:boolean',
				),
			)); ?>
		</fieldset>
		<?php if(!($model->isNewRecord)): ?>
			<fieldset>
				<legend><?php echo Yii::t('backend','Thông tin') ?></legend>
				<?php echo CHtml::link('Quản lý sản phẩm', array('/product/adminProductPost/admin', 'channel_id'=>$model->id)) ?>
			</fieldset>
		<?php endif; ?>
	</td>
</table>
<?php $this->endWidget(); ?>

</div><!-- form -->